package com.easylinkin.linkappapi.lobar.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.lobar.dto.LaborCompanyGroupDto;
import com.easylinkin.linkappapi.lobar.dto.app.EnterpriseDTO;
import com.easylinkin.linkappapi.lobar.entity.LaborCompany;
import com.easylinkin.linkappapi.lobar.vo.LaborCompanyGroupVo;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 劳务公司表 Mapper 接口
 * </p>
 *
 * @author kanyuanfeng
 * @since 2022-04-13
 */
public interface LaborCompanyMapper extends BaseMapper<LaborCompany> {

    IPage<LaborCompany> queryListByPage(Page page, @Param("laborCompany") LaborCompany laborCompany);

    /**
     * @param idsStr
     * @return
     */
    List<LaborCompany> selectCompanysByIdsStr(String idsStr);

    /**
     * 根据条件查询单位、班组信息
     * @param laborCompanyGroupVo 条件vo
     * @return 单位、班组Dto信息
     */
    List<LaborCompanyGroupDto> selectCompanyGroupDtoList(LaborCompanyGroupVo laborCompanyGroupVo);

    List<Map<String, Object>> countCompany(String tenantId);

    IPage<EnterpriseDTO> countCompanyPage(Page page, @Param("companyName") String companyName);
}
